README

LulaWebsite

What this is

My new personal website created with R pckg distill

Where it lives

How to generate local version

  1. From the Build pane, clicking on Build Website hammer icon
  2. Type rmarkdown::render_site(encoding = 'UTF-8') into the R console. This will:
    • Render all .Rmd and ,md files in the root dir into HTML (EXCEPT markdown files beginning with “_” )
    • Regenerate Blog posts
    • copy the generated HTML files in the output dir (_site/* or docs/*) along with supporting files (e.g. CSS and JavaScript)

Structure

How to add a blog post

  1. create it distill::create_post(title = "prova", collection = "posts", author = "auto", slug = "auto", date = Sys.Date(), draft = TRUE)
  2. knit it or run rmarkdown::render("_posts/2022-04-13-prova/prova.Rmd") (posts are considered standalone documents that are not re-rendered when the site is built)
  3. build site

Publication page

I imitate the smart model of Joel Nitta. To make it work, I had to figure out a few tweaks:

    +. Some type of my bib entries from Zotero were not being exported, but you can add in Zotero an "extra" field. see instructions [here](https://retorque.re/zotero-better-bibtex/exporting/extra-fields/).
        1.  Adding in in Extra `tex.referencetype: proceedings` --> makes the bibtex key become `@proceedings{g20-italy_g20_2021, ...`
        2. Adding in in Extra `tex.type: conference Proceedings` --> makes the bibtex key become `@proc ..., type = {conferenceProceedings},....`
    + In the functions I had to replace `if (is.na (url)) return(NULL)` (error when knit ) with ->  `if (anyNA(url)) return(NULL)`      
    + adding `./header.html` allows to use the [Academicons icons](https://jpswalsh.github.io/academicons/) (only fontawesome ones are inthe distill website by default)

Acknowledgements

I started from this great tutorial; borrowed the solution of Quang Nguyen to design the Project page; took ‘inspiration’ from Joel Nitta’s website for the theme. Here’s another nice example for later (with tutorial blog).